package com.chinasoft.listener;

import com.chinasoft.ui.PlayView;

import javax.swing.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

/**
 * @author 中软zhang
 * @create 2023-07-25 17:04
 */
public class StartButtonListener implements MouseListener {
    JFrame frame;

    public StartButtonListener(JFrame frame) {
        this.frame = frame;
    }

    @Override
    public void mouseClicked(MouseEvent e) {
        System.out.println("开始玩游戏了");
        PlayView playView = new PlayView();
        playView.setVisible(true);
        frame.dispose();
    }

    @Override
    public void mousePressed(MouseEvent e) {

    }

    @Override
    public void mouseReleased(MouseEvent e) {

    }

    @Override
    public void mouseEntered(MouseEvent e) {

    }

    @Override
    public void mouseExited(MouseEvent e) {

    }
}
